package cn.dujc.superkid.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * @author du
 * date 2018/8/4 下午12:32
 */
public class ExamineListEntity implements Parcelable {
    /**
     * id : 1397
     * problem_title : <p>猴子排好队，小鹿跑过来插进队伍中，他发现他的前面有4只猴子，后面有3只猴子，排队的猴子有（ ）只。</p>
     * problem_type : 3
     * exercises_answer : [""]
     * correct_answer : ["7"]
     * exercises_answer_list : [""]
     */

    private String id;//试卷题目id
    private String problem_title;//题目标题
    private String problem_type;//练习题类型（1-单选，2-多选，3-填空）
    private List<String> exercises_answer;//答案
    private List<String> correct_answer;//正确答案（如果是选择题3表示c）
    private List<String> exercises_answer_list;//答案列表
    private boolean isWrite;
    private String value="";

    public boolean isWrite() {
        return isWrite;
    }

    public String getValue() {
        return value;
    }

    public void setWrite(boolean write) {
        isWrite = write;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getId() { return id;}

    public void setId(String id) { this.id = id;}

    public String getProblem_title() { return problem_title;}

    public void setProblem_title(String problem_title) { this.problem_title = problem_title;}

    public String getProblem_type() { return problem_type;}

    public void setProblem_type(String problem_type) { this.problem_type = problem_type;}

    public List<String> getExercises_answer() { return exercises_answer;}

    public void setExercises_answer(List<String> exercises_answer) { this.exercises_answer = exercises_answer;}

    public List<String> getCorrect_answer() { return correct_answer;}

    public void setCorrect_answer(List<String> correct_answer) { this.correct_answer = correct_answer;}

    public List<String> getExercises_answer_list() { return exercises_answer_list;}

    public void setExercises_answer_list(List<String> exercises_answer_list) { this.exercises_answer_list = exercises_answer_list;}

    @Override
    public int describeContents() { return 0; }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.problem_title);
        dest.writeString(this.problem_type);
        dest.writeStringList(this.exercises_answer);
        dest.writeStringList(this.correct_answer);
        dest.writeStringList(this.exercises_answer_list);
    }

    public ExamineListEntity() {}

    protected ExamineListEntity(Parcel in) {
        this.id = in.readString();
        this.problem_title = in.readString();
        this.problem_type = in.readString();
        this.exercises_answer = in.createStringArrayList();
        this.correct_answer = in.createStringArrayList();
        this.exercises_answer_list = in.createStringArrayList();
    }

    public static final Creator<ExamineListEntity> CREATOR = new Creator<ExamineListEntity>() {
        @Override
        public ExamineListEntity createFromParcel(Parcel source) {return new ExamineListEntity(source);}

        @Override
        public ExamineListEntity[] newArray(int size) {return new ExamineListEntity[size];}
    };
}
